<!--
 $ @Author: liujiajun 45444154+wo1261931780@users.noreply.github.com
 $ @Date: 2022-06-05 21:40:19
 $ @LastEditors: liujiajun 45444154+wo1261931780@users.noreply.github.com
 $ @LastEditTime: 2022-06-05 21:40:25
 $ @FilePath: \st-html.github.io\src\aaa005\a031标签.html
 $ @Description: 1111
 $ @
 $ @Copyright (c) 2022 by liujiajun 45444154+wo1261931780@users.noreply.github.com, All Rights Reserved.
 -->
<!DOCTYPE html>
<html lang="en">

    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible"
              content="IE=edge" />
        <meta name="viewport"
              content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>

    <body>
        <input type="radio"
               name="sex"
               id="demo"
               value="" /><label for="demo">按钮1</label>
        <!-- name表示一个按钮是哪个组 -->
        <!-- id才是每个按钮的门牌号 -->
        <input type="radio"
               name="sex"
               id="demo2"
               value="" /><label for="demo2">按钮2</label>
        <label>
            <input type="radio"
                   name="sex"
                   id="demo3"
                   value="" />我是按钮3</label>
        <!-- 两种方式都可以实现，点击标签，自动选中radio的功能 -->
    </body>

</html>